|
|
|
|
|
|
|
In Table 21.3, each level adds additional privileges. The final level (Level 5) includes all previously defined rights plus special extended rights. You can use this level to define any special powers, depending on the object or system (supervisor control, for example). |
|
|
|
|
|
|
|
|
Set up a data table that contains three columnsUser ID, Object, and Level. The User ID should match the one in the AppUser table you already defined. The Level column contains values 0 through 5, and the Object column contains the name of a secured program object. This object could be a report, a data entry form, or even a menu item or command button. |
|
|
|
|
|
|
|
|
There is a single record in the dataset for each secured program object. This default set is used to establish the base security profile for the system. If an object is in the default set, it is a secured object, and any users who attempt access to the program object must have their own access record defined for the requested object. If no object is present for a particular user, the user cannot access the program object. |
|
|
|
|
|
|
|
|
You need to add just a bit of new code to the prjUsrObject class library in order to implement an access rights scheme. First, you need a routine that verifies the user access information when requested. You need a few support routines along the way, too (you get to those later). But first, you need to modify the User Maintenance form to include data entry for access rights. |
|
|
|
|
|
|
|
|
Building the User Access Rights Maintenance Form |
|
|
|
|
|
|
|
|
The first order of business is to create the data entry form needed to create and edit user access rights. This form is the second page of the tabbed dialog you built to manage the User table. Use Table 21.4 and Figure 21.5 as guides in laying out the Access Rights tab of the User Maintenance form. |
|
|
|
|
|
|
|
|
Figure 21.5.
Laying out the Access Rights tab. |
|
|
|
|
|